cmake_minimum_required(VERSION 3.20)
#aarch64-linux-gnu-gcc 工具链设置
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_ASM_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
set(CMAKE_ADDR2LINE aarch64-linux-gnu-addr2line)
set(CMAKE_AR aarch64-linux-gnu-ar)
set(CMAKE_RANLIB aarch64-linux-gnu-ranlib)
set(CMAKE_CXX_COMPILER_AR aarch64-linux-gnu-ar)
set(CMAKE_CXX_COMPILER_RANLIB aarch64-linux-gnu-ranlib)
set(CMAKE_C_COMPILER_AR aarch64-linux-gnu-ar)
set(CMAKE_C_COMPILER_RANLIB aarch64-linux-gnu-ranlib)
set(CMAKE_Fortran_COMPILER aarch64-linux-gnu-gfortan)
set(CMAKE_OBJCOPY aarch64-linux-gnu-objcopy)
set(CMAKE_OBJDUMP aarch64-linux-gnu-objdump)
set(CMAKE_RC_COMPILER aarch64-linux-gnu-windres)
set(CMAKE_READELF aarch64-linux-gnu-readelf)
set(CMAKE_SIZE  aarch64-linux-gnu-size)
set(CMAKE_STRIP aarch64-linux-gnu-strip)
set(CMAKE_LINKER aarch64-linux-gnu-ld)
